/*
 This class handles the persiting of objects
 */
package edu.chl.chrfra.controller;

import edu.chl.chrfra.exceptions.NonexistentEntityException;
import java.util.Collection;
import java.util.List;
import javax.persistence.EntityManager;

public interface IJpaCtrl<T> {

    void create(T t);

    void destroy(Long id) throws NonexistentEntityException;

    void edit(T t) throws NonexistentEntityException, Exception;

    T findEntity(Long id);

    Collection<T> findEntities();

    Collection<T> findEntities(int maxResults, int firstResult);

    EntityManager getEntityManager();

    int getEntityCount();
    
}
